package com.gzy.android_douban.ui.home;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;

import com.gzy.android_douban.databinding.ActivitySearchBinding;
import com.gzy.android_douban.ui.MainActivity;

public class SearchActivity extends AppCompatActivity {
    ActivitySearchBinding binding;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        binding = ActivitySearchBinding.inflate(getLayoutInflater());
        setContentView(binding.getRoot());
        initClick();
    }

    private void initClick() {
        binding.imgBackbtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Toast.makeText(SearchActivity.this, "返回主页", Toast.LENGTH_SHORT).show();
                Intent intent =  new Intent(SearchActivity.this,HomeFragment.class);
                finish();
            }
        });
    }
}